#include<stdio.h>
main()
{
    int x,n=0,a;
    scanf("%d",&x);
    for(int i=1;i<=x;i++)
    {
        if(x%i==0&&x/i%2!=0&&x/i+1<=2*i&&x/i+1<=2*(x-i+1))n++;
        if(x*2%(i+i+1)==0&&x*2%((i+i+1))==0&&x*2/(i+i+1)<=2*i&&x*2/(i+i+1)<=2*(x-i+1))n++;
    }
    printf("n=%d\n",n);
    return 0;
}
